1. Field of the Invention
The invention relates to a method for the indirectly addressing a number of cells in a memory, and to an automation component for use in an industrial automation arrangement for implementing the method.
2. Description of the Related Art
For read or write access to memory cells in a microprocessor architecture, programs use addresses which are mapped by variables, for example. Alongside the direct denotation of variables or other types of addresses, indirect addressing is often also used, such memory access not referencing the relevant cell(s) of a memory directly, but rather the cell(s) to which the memory access refers being ascertained by other variables only at the runtime of the program. Particularly when programs are written for programmable logic controllers (PLC), complex programs frequently involve the use of indirect addressing. This means that the address of the referenced memory area or of the referenced cells in the memory is first determined or formed during the execution of a program, for example, as an index number for an indexed variable or as a “string” for a text-based variable name. The final addresses for memory access operations are therefore first available at runtime, but not during the actual writing of a program for the programmable logic controller.
For the case of the programming languages that are used for programmable logic controllers, e.g., AWL (instruction list) or structured control language (SCL), a programmer has the option of providing indirect addressing for memory areas of data blocks, physical inputs, physical outputs and globally addressable memory areas (flags). In this context, the use of indirect addressing has associated disadvantages on a case-by-case basis, however. By way of example, what are known as “cross references” can be established only with difficulty or not at all at the programming time, i.e., an overview of the access operations for a particular address or memory cell often cannot be formed with the necessary exactness at the programming time because the actual addresses are not generated until the runtime of the program. It is thus barely comprehensible whether and which memory areas are manipulated by indirect addressing, and which are not. In addition, a “protection problem” arises, i.e., when the addresses are formed at the runtime it is necessary for additional measures to ensure that nonvalid or nonexistent memory areas are not mistakenly accessed, which would result in an error at runtime. With respect to the physical interfaces, particularly with respect to the control outputs, it is possible for access operations on such outputs as are either nonexistent or permitted to be manipulated only by other program portions or other subroutines to be formed unintentionally at runtime.